package com.esurvey.core;
import java.io.*;

public class eSurveyUtilities {
	
	public static InputStream getResource (String resource) {
		return new Object() {}.getClass().getClassLoader().getResourceAsStream(resource);
	}
	
	public static boolean str2boo (String s) throws eSurveyException {
		boolean b;
		if (s.equals("true")) {
			b=true;
		} else if (s.equals("false")) {
			b=false;
		} else {
			throw new eSurveyException("Cannot convert "+s.toString()+ " to boolean");
		}
		return b;
	}
	
}
